<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        var num1 = parseFloat(prompt("请输入语文成绩"))
        var num2 = parseFloat(prompt("请输入数学成绩"))
        var num3 = parseFloat(prompt("请输入英语成绩"))
        var num4 = parseFloat(prompt("请输入化学语绩"))
        var num5 = parseFloat(prompt("请输入历史成绩"))
        var avg = (num1 + num2 + num3 + num4 + num5) / 5;
        switch (parseInt(avg / 10)) {
            case 10: ;
            case 9: alert("优秀"); break;
            case 8: alert("良好"); break;
            case 7: alert("一般"); break;
            case 6: alert("较差"); break;
            default: alert("很差"); break;
        }
    </script>
</body>

</html>